﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Agenda_Project.Models
{
    public abstract class LogModel : DataModel
    {
        public long LogID { get; set; }
        public string LogDate { get; set; }
        public string LogTime { get; set; }
    }

    public partial class PersonLog : LogModel
    {
        //public long LogID { get; set; }
        //public string LogDate { get; set; }
        //public string LogTime { get; set; }
        //public long ID { get; set; }
        //public string Code { get; set; }
        //public string Name { get; set; }
        //public string NameTH { get; set; }
        //public bool Active { get; set; }
        //public long CreateByID { get; set; }
        //public string CreateDate { get; set; }
        //public string CreateTime { get; set; }
        public string Title { get; set; }
        public string Surname { get; set; }
        public string SurnameTH { get; set; }
        public string PrimaryEmail { get; set; }
        public string SecondaryEmail { get; set; }

        public PersonLog(Person person)
        {
            this.LogID = 0;
            this.LogDate = "";
            this.LogTime = "";
            this.ID = person.ID;
            this.Code = person.Code;
            this.Name = person.Name;
            this.NameTH = person.NameTH;
            this.Active = person.Active;
            this.CreateByID = person.CreateByID;
            this.CreateDate = person.CreateDate;
            this.CreateTime = person.CreateTime;

            this.Title = person.Title;
            this.Surname = person.Surname;
            this.SurnameTH = person.SurnameTH;
            this.PrimaryEmail = person.PrimaryEmail;
            this.SecondaryEmail = person.SecondaryEmail;
        }
    }

    public partial class UserLog : LogModel
    {
        //public long LogID { get; set; }
        //public string LogDate { get; set; }
        //public string LogTime { get; set; }
        //public long ID { get; set; }
        //public string Code { get; set; }
        //public string Name { get; set; }
        //public string NameTH { get; set; }
        //public bool Active { get; set; }
        //public long CreateByID { get; set; }
        //public string CreateDate { get; set; }
        //public string CreateTime { get; set; }

        public long PersonID { get; set; }
        public string Password { get; set; }
        public DateTimePeriod Period { get; set; }

        public UserLog(User user)
        {
            this.LogID = 0;
            this.LogDate = "";
            this.LogTime = "";
            this.ID = user.ID;
            this.Code = user.Code;
            this.Name = user.Name;
            this.NameTH = user.NameTH;
            this.Active = user.Active;
            this.CreateByID = user.CreateByID;
            this.CreateDate = user.CreateDate;
            this.CreateTime = user.CreateTime;

            this.PersonID = user.PersonID;
            this.Password = user.Password;
            this.Period = user.Period;
        }
    }

    public partial class CommitteeLog : LogModel
    {
        //public long LogID { get; set; }
        //public string LogDate { get; set; }
        //public string LogTime { get; set; }
        //public long ID { get; set; }
        //public string Code { get; set; }
        //public string Name { get; set; }
        //public string NameTH { get; set; }
        //public bool Active { get; set; }
        //public long CreateByID { get; set; }
        //public string CreateDate { get; set; }
        //public string CreateTime { get; set; }
        //public string Remark { get; set; }
        //public long CancelByID { get; set; }
        //public string CancelDate { get; set; }
        //public string CancelTime { get; set; }

        public CommitteeLog(Committee committee)
        {
            this.LogID = 0;
            this.LogDate = "";
            this.LogTime = "";
            this.ID = committee.ID;
            this.Code = committee.Code;
            this.Name = committee.Name;
            this.NameTH = committee.NameTH;
            this.Active = committee.Active;
            this.CreateByID = committee.CreateByID;
            this.CreateDate = committee.CreateDate;
            this.CreateTime = committee.CreateTime;
            this.Remark = committee.Remark;
            this.CancelByID = committee.CancelByID;
            this.CancelDate = committee.CancelDate;
            this.CancelTime = committee.CancelTime;
        }
    }

    public partial class CommitteeMemberLog : LogModel
    {
        //public long LogID { get; set; }
        //public string LogDate { get; set; }
        //public string LogTime { get; set; }
        //public long ID { get; set; }
        //public string Code { get; set; }
        //public string Name { get; set; }
        //public string NameTH { get; set; }
        //public bool Active { get; set; }
        //public long CreateByID { get; set; }
        //public string CreateDate { get; set; }
        //public string CreateTime { get; set; }
        //public string Remark { get; set; }
        //public long CancelByID { get; set; }
        //public string CancelDate { get; set; }
        //public string CancelTime { get; set; }

        public long CommitteeID { get; set; }
        public byte CommitteeRoleID { get; set; }
        public long UserID { get; set; }
        public DateTimePeriod Period { get; set; }

        public CommitteeMemberLog(CommitteeMember committeeMember)
        {
            this.LogID = 0;
            this.LogDate = "";
            this.LogTime = "";
            this.ID = committeeMember.ID;
            this.Code = committeeMember.Code;
            this.Name = committeeMember.Name;
            this.NameTH = committeeMember.NameTH;
            this.Active = committeeMember.Active;
            this.CreateByID = committeeMember.CreateByID;
            this.CreateDate = committeeMember.CreateDate;
            this.CreateTime = committeeMember.CreateTime;
            this.Remark = committeeMember.Remark;
            this.CancelByID = committeeMember.CancelByID;
            this.CancelDate = committeeMember.CancelDate;
            this.CancelTime = committeeMember.CancelTime;

            this.CommitteeID = committeeMember.CommitteeID;
            this.CommitteeRoleID = committeeMember.CommitteeRoleID;
            this.Period = committeeMember.Period;
        }
    }

    public partial class MeetingLog : LogModel
    {
        //public long LogID { get; set; }
        //public string LogDate { get; set; }
        //public string LogTime { get; set; }
        //public long ID { get; set; }
        //public string Code { get; set; }
        //public string Name { get; set; }
        //public string NameTH { get; set; }
        //public bool Active { get; set; }
        //public long CreateByID { get; set; }
        //public string CreateDate { get; set; }
        //public string CreateTime { get; set; }
        //public string Remark { get; set; }
        //public long CancelByID { get; set; }
        //public string CancelDate { get; set; }
        //public string CancelTime { get; set; }

        public byte MeetingTypeID { get; set; }
        public string DocumentNo { get; set; }
        public string Building { get; set; }
        public string Floor { get; set; }
        public string Room { get; set; }
        public bool IsSentMail { get; set; }
        public DateTimePeriod Period { get; set; }

        public MeetingLog(Meeting meeting)
        {
            this.LogID = 0;
            this.LogDate = "";
            this.LogTime = "";
            this.ID = meeting.ID;
            this.Code = meeting.Code;
            this.Name = meeting.Name;
            this.NameTH = meeting.NameTH;
            this.Active = meeting.Active;
            this.CreateByID = meeting.CreateByID;
            this.CreateDate = meeting.CreateDate;
            this.CreateTime = meeting.CreateTime;
            this.Remark = meeting.Remark;
            this.CancelByID = meeting.CancelByID;
            this.CancelDate = meeting.CancelDate;
            this.CancelTime = meeting.CancelTime;

            this.MeetingTypeID = meeting.MeetingTypeID;
            this.DocumentNo = meeting.DocumentNo;
            this.Building = meeting.Building;
            this.Floor = meeting.Floor;
            this.Room = meeting.Room;
            this.IsSentMail = meeting.IsSentMail;
            this.Period = meeting.Period;
        }
    }

    public partial class MeetingAgendaLog : LogModel
    {
        //public long LogID { get; set; }
        //public string LogDate { get; set; }
        //public string LogTime { get; set; }
        //public long ID { get; set; }
        //public string Code { get; set; }
        //public string Name { get; set; }
        //public string NameTH { get; set; }
        //public bool Active { get; set; }
        //public long CreateByID { get; set; }
        //public string CreateDate { get; set; }
        //public string CreateTime { get; set; }
        //public string Remark { get; set; }
        //public long CancelByID { get; set; }
        //public string CancelDate { get; set; }
        //public string CancelTime { get; set; }

        public byte OwnerTypeID { get; set; }
        public long OwnerID { get; set; }
        public string OwnerName { get; set; }
        public long MeetingID { get; set; }
        public bool IsProcessed { get; set; }

        public MeetingAgendaLog(MeetingAgenda meetingAgenda)
        {
            this.LogID = 0;
            this.LogDate = "";
            this.LogTime = "";
            this.ID = meetingAgenda.ID;
            this.Code = meetingAgenda.Code;
            this.Name = meetingAgenda.Name;
            this.NameTH = meetingAgenda.NameTH;
            this.Active = meetingAgenda.Active;
            this.CreateByID = meetingAgenda.CreateByID;
            this.CreateDate = meetingAgenda.CreateDate;
            this.CreateTime = meetingAgenda.CreateTime;
            this.Remark = meetingAgenda.Remark;
            this.CancelByID = meetingAgenda.CancelByID;
            this.CancelDate = meetingAgenda.CancelDate;
            this.CancelTime = meetingAgenda.CancelTime;

            this.OwnerTypeID = meetingAgenda.OwnerTypeID;
            this.OwnerID = meetingAgenda.OwnerID;
            this.OwnerName = meetingAgenda.OwnerName;
            this.MeetingID = meetingAgenda.MeetingID;
            this.IsProcessed = meetingAgenda.IsProcessed;
        }
    }

    public partial class MeetingAgendaTopicLog : LogModel
    {
        //public long LogID { get; set; }
        //public string LogDate { get; set; }
        //public string LogTime { get; set; }
        //public long ID { get; set; }
        //public string Code { get; set; }
        //public string Name { get; set; }
        //public string NameTH { get; set; }
        //public bool Active { get; set; }
        //public long CreateByID { get; set; }
        //public string CreateDate { get; set; }
        //public string CreateTime { get; set; }
        //public string Remark { get; set; }
        //public long CancelByID { get; set; }
        //public string CancelDate { get; set; }
        //public string CancelTime { get; set; }

        public long AgendaID { get; set; }
        public byte TopicTypeID { get; set; }
        public long ReferenceTopicID { get; set; }
        public string TopicContent { get; set; }
        public string MeetingContent { get; set; }
        public bool IsAccepted { get; set; }
        public string Condition { get; set; }

        public MeetingAgendaTopicLog(MeetingAgendaTopic meetingAgendaTopic)
        {
            this.LogID = 0;
            this.LogDate = "";
            this.LogTime = "";
            this.ID = meetingAgendaTopic.ID;
            this.Code = meetingAgendaTopic.Code;
            this.Name = meetingAgendaTopic.Name;
            this.NameTH = meetingAgendaTopic.NameTH;
            this.Active = meetingAgendaTopic.Active;
            this.CreateByID = meetingAgendaTopic.CreateByID;
            this.CreateDate = meetingAgendaTopic.CreateDate;
            this.CreateTime = meetingAgendaTopic.CreateTime;
            this.Remark = meetingAgendaTopic.Remark;
            this.CancelByID = meetingAgendaTopic.CancelByID;
            this.CancelDate = meetingAgendaTopic.CancelDate;
            this.CancelTime = meetingAgendaTopic.CancelTime;

            this.AgendaID = meetingAgendaTopic.AgendaID;
            this.TopicTypeID = meetingAgendaTopic.TopicTypeID;
            this.ReferenceTopicID = meetingAgendaTopic.ReferenceTopicID;
            this.TopicContent = meetingAgendaTopic.TopicContent;
            this.MeetingContent = meetingAgendaTopic.MeetingContent;
            this.IsAccepted = meetingAgendaTopic.IsAccepted;
            this.Condition = meetingAgendaTopic.Condition;
        }
    }

    public partial class MeetingMemberLog : LogModel
    {
        //public long LogID { get; set; }
        //public string LogDate { get; set; }
        //public string LogTime { get; set; }
        //public long ID { get; set; }
        //public string Code { get; set; }
        //public string Name { get; set; }
        //public string NameTH { get; set; }
        //public bool Active { get; set; }
        //public long CreateByID { get; set; }
        //public string CreateDate { get; set; }
        //public string CreateTime { get; set; }
        //public string Remark { get; set; }
        //public long CancelByID { get; set; }
        //public string CancelDate { get; set; }
        //public string CancelTime { get; set; }

        public long MeetingID { get; set; }
        public long MemberID { get; set; }
        public byte RoleTypeID { get; set; }
        public bool IsParticipate { get; set; }

        public MeetingMemberLog(MeetingMember meetingMember)
        {
            this.LogID = 0;
            this.LogDate = "";
            this.LogTime = "";
            this.ID = meetingMember.ID;
            this.Code = meetingMember.Code;
            this.Name = meetingMember.Name;
            this.NameTH = meetingMember.NameTH;
            this.Active = meetingMember.Active;
            this.CreateByID = meetingMember.CreateByID;
            this.CreateDate = meetingMember.CreateDate;
            this.CreateTime = meetingMember.CreateTime;
            this.Remark = meetingMember.Remark;
            this.CancelByID = meetingMember.CancelByID;
            this.CancelDate = meetingMember.CancelDate;
            this.CancelTime = meetingMember.CancelTime;

            this.MeetingID = meetingMember.MeetingID;
            this.MemberID = meetingMember.MemberID;
            this.RoleTypeID = meetingMember.RoleTypeID;
            this.IsParticipate = meetingMember.IsParticipate;
        }
    }

    public partial class MeetingMemberVoteLog : LogModel
    {
        //public long LogID { get; set; }
        //public string LogDate { get; set; }
        //public string LogTime { get; set; }
        //public long ID { get; set; }
        //public string Code { get; set; }
        //public string Name { get; set; }
        //public string NameTH { get; set; }
        //public bool Active { get; set; }
        //public long CreateByID { get; set; }
        //public string CreateDate { get; set; }
        //public string CreateTime { get; set; }
        //public string Remark { get; set; }
        //public long CancelByID { get; set; }
        //public string CancelDate { get; set; }
        //public string CancelTime { get; set; }

        public long TopicID { get; set; }
        public long MemberID { get; set; }
        public byte VoteTypeID { get; set; }

        public MeetingMemberVoteLog(MeetingMemberVote meetingMemberVote)
        {
            this.LogID = 0;
            this.LogDate = "";
            this.LogTime = "";
            this.ID = meetingMemberVote.ID;
            this.Code = meetingMemberVote.Code;
            this.Name = meetingMemberVote.Name;
            this.NameTH = meetingMemberVote.NameTH;
            this.Active = meetingMemberVote.Active;
            this.CreateByID = meetingMemberVote.CreateByID;
            this.CreateDate = meetingMemberVote.CreateDate;
            this.CreateTime = meetingMemberVote.CreateTime;
            this.Remark = meetingMemberVote.Remark;
            this.CancelByID = meetingMemberVote.CancelByID;
            this.CancelDate = meetingMemberVote.CancelDate;
            this.CancelTime = meetingMemberVote.CancelTime;

            this.TopicID = meetingMemberVote.TopicID;
            this.MemberID = meetingMemberVote.MemberID;
            this.VoteTypeID = meetingMemberVote.VoteTypeID;
        }
    }

    public partial class MeetingReportLog : LogModel
    {
        //public long LogID { get; set; }
        //public string LogDate { get; set; }
        //public string LogTime { get; set; }
        //public long ID { get; set; }
        //public string Code { get; set; }
        //public string Name { get; set; }
        //public string NameTH { get; set; }
        //public bool Active { get; set; }
        //public long CreateByID { get; set; }
        //public string CreateDate { get; set; }
        //public string CreateTime { get; set; }
        //public string Remark { get; set; }
        //public long CancelByID { get; set; }
        //public string CancelDate { get; set; }
        //public string CancelTime { get; set; }

        public long MeetingID { get; set; }
        public long ReviewByID { get; set; }
        public long AssureByID { get; set; }
        public string Revision { get; set; }

        public MeetingReportLog(MeetingReport meetingReport)
        {
            this.LogID = 0;
            this.LogDate = "";
            this.LogTime = "";
            this.ID = meetingReport.ID;
            this.Code = meetingReport.Code;
            this.Name = meetingReport.Name;
            this.NameTH = meetingReport.NameTH;
            this.Active = meetingReport.Active;
            this.CreateByID = meetingReport.CreateByID;
            this.CreateDate = meetingReport.CreateDate;
            this.CreateTime = meetingReport.CreateTime;
            this.Remark = meetingReport.Remark;
            this.CancelByID = meetingReport.CancelByID;
            this.CancelDate = meetingReport.CancelDate;
            this.CancelTime = meetingReport.CancelTime;

            this.MeetingID = meetingReport.MeetingID;
            this.ReviewByID = meetingReport.ReviewByID;
            this.AssureByID = meetingReport.AssureByID;
            this.Revision = meetingReport.Revision;
        }
    }
}